package com.gasolinator.a;

import com.gasolinator.a.app.helper.NumberFormats;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

/**
 * Created by IntelliJ IDEA.
 * User: fjhidalgo
 * Date: 16/12/11
 * Time: 10:50
 * To change this template use File | Settings | File Templates.
 */
public class NumberFormatsTest {


    @DataProvider(name = "distances")
    Object[][] getDistances(){
        return new Object[][]{
                {83.48212216342282,"83m"},
                {111.19492664455873,"111m"},
                {1151.56100219905363,"1km"},
                {1000.2314,"1km"},
                {100300.48212216342282,"100km"},
        };
    }
    @Test(dataProvider = "distances")
    public void testDistanceFormat_returnsMetersOrKilometers(Double distance, String expected) throws Exception {
        String actual = NumberFormats.distanceFormat(distance);
        Assert.assertEquals(actual,expected);
    }

    @Test
    public void testPriceFormat() throws Exception {

    }

    @Test
    public void testFormatDist() throws Exception {

    }

    @Test
    public void testFormatDec() throws Exception {

    }
}
